//
//  CCSceneManager.h
//  ShadowMapping
//
//  Created by Daniel Corleone on 19/6/14.
//  Copyright (c) 2014年 iCloverStudio. All rights reserved.
//

#ifndef __ShadowMapping__CCSceneManager__
#define __ShadowMapping__CCSceneManager__

#include "CCNode.h"
#include "CCCamera.h"

BECO_NAMESPACE_BEGIN

class Mesh;

class SceneManager
    : public Node
{
public:
    ~SceneManager();
    static SceneManager* Instance(void);
    
protected:
    explicit SceneManager();
    explicit SceneManager(Node* parent);
    
public:
    Camera* CreateCamera(Camera::Camera_Type _camType, const String& name);
	Mesh* CreateMesh(const String& name);

public:
	virtual void Update(const Real timeInterval);
	virtual void Render(const Real timeInterval);

private:
	void addIntoNodeCollection(Node* node4Add);
	void removeFromNodeCollection(Node* node4Remove);
	Boolean isNodeExisted(const String& name);

private:
    static SceneManager* instance;
    std::vector<Node*> mAllNodes;
    
};

BECO_NAMESPACE_END

#endif /* defined(__ShadowMapping__CCSceneManager__) */
